<template>
<slot :controller="controller" :store="store" :model="model">
    <div :class="classNames">
    </div>
</slot>
</template>
<script lang="ts" setup>
// 基于template/src/views/{{appModules}}/{{pages@DEEDITVIEW2}}/{{spinalCase page.codeName}}-base.vue.hbs生成
import { AppCtrlPos, AppScrollContainer, AppSimpleFlexContainer, AppStandardContainer, AppTabPanel, AppTabPage } from '@components/layout-element/structure';

import { AppToolbar } from '@components/widgets/toolbar';

import IBIZOrderSFormForm from '@widgets/ibiz-order/s-form-form/s-form-form.vue';
import IBIZOrderDefaultDrbar from '@widgets/ibiz-order/default-drbar/default-drbar.vue';
import { useProps, useBasic, useAction, useController } from './ibiz-order-test-cl-edit-view-2-hook';
import { IEvent, EditView2ActionType, IEditView2Ability, IEditView2Store, IParam } from '@/core';

// 输入参数
const props = defineProps(useProps());

// 基础数据
const { 
    model,
    getClassNames, 
    useNavParamsBind,
	useEventBind,
    handleQuickSearch,
  	handleToolbarItemClick,
    handleComponentAction,
	handleCtrlAction,
	handleCtrlInit,
	handleCtrlDestroy
} = useBasic(props);

const emit = defineEmits<{
    (event: 'view-action', name: string, action: EditView2ActionType, data: IParam[]): void;
    (event: 'view-init', name: string, data: IEditView2Ability): void;
    (event: 'view-mounted', name: string, data: IParam): void;
    (event: 'view-destroy', name: string, data: IParam): void;
}>();

const evt = useEventBind(emit);
const classNames = computed(() => {
  	return getClassNames(props);
});

// 初始化控制器
const controller = useController(props, evt);

useNavParamsBind(controller, props);

const store: IEditView2Store = controller.getStore();

onMounted(() => {
    controller.viewMounted();
})

onUnmounted(() => {
    controller.viewDestroy();
})
</script>
